package com.codi.bus.core.fund.request;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.Pattern;

/**
 * 模块名
 *
 * @author spy
 * @version 1.0 2018-01-25
 * @since 1.0
 */

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class DividendChangeRequestDto {

    @NotEmpty
    private String tradeAcco;

    @NotEmpty
    private String taAcco;

    @NotEmpty
    private String fundCode;

    @NotEmpty
    @Length(min = 1, max = 1, message = "请设置分红方式0或1")
    private String autoBuy;

    @NotEmpty
    @Length(min = 6, max = 6, message = "交易密码为6位")
    @Pattern(regexp = "[\\d]{6}", message = "交易密码为6位数字")
    private String password;

    @NotEmpty
    private String sign;

    private Long userId;

    private String bizType;
}
